package com.herokuapp.zhachuang.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author P-C Lin (a.k.a 高科技黑手)
 */
@RestController
@RequestMapping
public class WelcomeController {

	private static final Logger LOGGER = LoggerFactory.getLogger(WelcomeController.class);

	@RequestMapping(path = "/")
	String index(@RequestBody(required = false) String requestBody) {
		LOGGER.info(
			"往溝：\n\n{}\n",
			requestBody
		);
		return requestBody;
	}
}
